package zadanie5Done;

class Server extends Thread 
{
	private Resource box;
	private int id;
	private int operationsNumber;
	public Server(Resource c, int id, int operationsNumber) 
	{
		box = c;
		this.id = id;
		this.operationsNumber = operationsNumber;
	}
	public void run() 
	{
     		int value = 0;
    	 	for (int i = 0; i < this.operationsNumber; i++) 
    	 	{
    	 		value = box.get();
       			System.out.println("Server " + this.id + " get: " + value);
    		}
	}
}